<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <link href="../../style/css/style.css" rel="stylesheet" type="text/css" />
    <script src="../../style/js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript">
       function save(){
           var adminId = window.sessionStorage.getItem("id");
           var name = $("#nameId").val();
           console.log(adminId);
           $.post("../../newsType/save", {name:name,id:adminId},function (res) {
               if (res.code==200){                   alert("添加成功!!");
                   location.assign("list.html");
               } else {
                   alert("服务器忙碌");
               }
           });
       }
    </script>
</head>

<body>
<form id="formId">
    <div class="formbody">
        <div class="formtitle"><span>基本信息</span></div>
        <ul class="forminfo">
            <li>
                <label>新闻类型名称</label>
                <input class="dfinput" id="nameId"  name="name" type="text"/>
            </li>

            <li>
                <input name="" type="button" class="btn" value="确认保存" onclick="save()"/>
            </li>
        </ul>
    </div>
</form>
</body>

</html>
